package com.ax.associator.store.service.impl;

import com.ax.associator.store.common.utils.ErrorUtil;
import com.ax.associator.store.common.utils.Query;
import com.ax.associator.store.dao.BaseChargeRulesMapper;
import com.ax.associator.store.dao.PrescriptionAuditMapper;
import com.ax.associator.store.dao.PrescriptionMastMapper;
import com.ax.associator.store.domain.BaseChargeRules;
import com.ax.associator.store.domain.PrescriptionAudit;
import com.ax.associator.store.domain.PrescriptionMast;
import com.ax.associator.store.service.PrescriptionAuditService;
import org.apache.shiro.util.Assert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PrescriptionAuditServiceImpl implements PrescriptionAuditService {

    @Autowired
    private PrescriptionAuditMapper prescriptionAuditMapper;

    @Autowired
    private BaseChargeRulesMapper baseChargeRulesMapper;

    @Autowired
    private PrescriptionMastMapper prescriptionMastMapper;

    @Override
    public List<PrescriptionAudit> queryAuditRecord(Long associatorId) {
        Assert.notNull(associatorId,String.format(ErrorUtil.PARAMETER_NULL, "associatorId"));

        List<PrescriptionAudit> list=prescriptionAuditMapper.queryAuditRecord(associatorId);
        return list;
    }

    @Override
    public List<BaseChargeRules> queryMemberTerm() {
        List<BaseChargeRules> list=baseChargeRulesMapper.queryMemberTerm();
        return list;
    }

    @Override
    public List<PrescriptionMast> queryMemberProfile(Long associatorId) {
        Assert.notNull(associatorId,String.format(ErrorUtil.PARAMETER_NULL, "associatorId"));
        List<PrescriptionMast> list=prescriptionMastMapper.queryMemberProfile(associatorId);
        return list;
    }
}
